Task Based Help > Working with Report Fields > Loading Custom fields |
Reports for WPF allow users to load reports that contain custom fields by using the CustomFields assembly. Reports created by the C1ReportDesigner application offers following custom fields:
Note that some custom fields, such as those listed below, need additional ComponentOne assemblies to be referenced:
The following sample creates the report definition with Chart custom field, loads, and renders it to C1DocumentViewer in WPF application; the steps are illustrated as follows:
C# |
Copy Code
|
---|---|
public MainWindow() { InitializeComponent(); var report = new C1.C1Report.C1Report(); report.Load("ChartField.xml", "Chart"); this.c1DocumentViewer.Document = report.C1Document.FixedDocumentSequence; } |
VB |
Copy Code
|
---|---|
Public Sub New() InitializeComponent() Dim report = New C1.C1Report.C1Report() report.Load("ChartField.xml", "Chart") Me.c1DocumentViewer.Document = report.C1Document.FixedDocumentSequence End Sub |
From 2015v2 onwards, for WPF applications referencing C1.WPF.C1Report.CustomFields.4 dll, please add C1.Win.4 and C1.Win.Barcode.4 dlls to your projects. |